package com.example.overdue.data;

import com.example.fresh.R;

//过期物品的实体类
public class OberdueData {

    private long time = 0;//过期物品时间戳
    private int type = 0;//过期物品类别:0水果,1学生用品
    private String title = "";//过期物品标题


    public OberdueData(long time, int type, String title) {
        this.time = time;
        this.title = title;
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getTypeImage(){
        if (getType()==0){
            return R.drawable.ic_type1;
        }else if (getType()==1){
            return R.drawable.ic_type2;
        }else{
            return R.drawable.ic_type1;
        }
    }

    public String getTypeStr(){
        if (getType()==0){
            return "水果";
        }else if (getType()==1){
            return "学生用品";
        }else{
            return "水果";
        }
    }


}
